package com.ruoyi.market.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 营销活动对象 market_activity
 *
 * @author ruoyi
 * @date 2023-01-29
 */
@TableName("market_activity")
public class MarketActivity extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId(type = IdType.AUTO)
    @TableField("id")
    private Long id;

    /** 活动名称 */
    @Excel(name = "活动名称")
    @TableField("name")
    private String name;

    /** 活动连接 */
    @Excel(name = "活动连接")
    @TableField("url")
    private String url;

    /** 活动状态 */
    @Excel(name = "活动状态")
    @TableField("state")
    private Long state;

    /** 活动结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("end_time")
    private Date endTime;

    /** 活动显示位置 */
    @Excel(name = "活动显示位置")
    @TableField("position")
    private String position;

    /** 活动规则 */
    @Excel(name = "活动规则")
    @TableField("rule")
    private String rule;

    /** 活动序号 */
    @Excel(name = "活动序号")
    @TableField("sequence")
    private Long sequence;

    /** 活动封面 */
    @Excel(name = "活动封面")
    @TableField("cover")
    private String cover;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setUrl(String url)
    {
        this.url = url;
    }

    public String getUrl()
    {
        return url;
    }
    public void setState(Long state)
    {
        this.state = state;
    }

    public Long getState()
    {
        return state;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setPosition(String position)
    {
        this.position = position;
    }

    public String getPosition()
    {
        return position;
    }
    public void setRule(String rule)
    {
        this.rule = rule;
    }

    public String getRule()
    {
        return rule;
    }
    public void setSequence(Long sequence)
    {
        this.sequence = sequence;
    }

    public Long getSequence()
    {
        return sequence;
    }
    public void setCover(String cover)
    {
        this.cover = cover;
    }

    public String getCover()
    {
        return cover;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("url", getUrl())
            .append("createTime", getCreateTime())
            .append("state", getState())
            .append("endTime", getEndTime())
            .append("position", getPosition())
            .append("rule", getRule())
            .append("sequence", getSequence())
            .append("cover", getCover())
            .toString();
    }
}
